
<!DOCTYPE html>
<html lang="ch">
<head>
<meta charset="utf-8">
<title>Insert title here</title>
<link rel="stylesheet" href="./assets/layui/css/layui.css">
<link rel="stylesheet" href="./assets/css/admin.css">
<link rel="stylesheet" href="./assets/css/public.css">
<script src="./assets/layui/layui.js"></script>

<script src="./assets/js/jquery-3.4.1.min.js"></script>
</head>
<body>
<script>
	let user = sessionStorage.getItem("user")
	user =JSON.parse(user);
	console.log(user);
	if(user==null ||user==''){
		location.href="./login.html";
	}
</script>
<div class="layui-layout layui-layout-admin">
			<div class="layui-header">
				<div class="layui-logo">图书管理系统</div>
				<!-- 头部区域（可配合layui已有的水平导航） -->
				
				<ul class="layui-nav layui-layout-left">
					<li class="layui-nav-item layui-this" data-nav="1"><a href="javascript:;">基础数据</a></li>
					<li class="layui-nav-item" data-nav="2"><a href="javascript:;">数据分析</a></li>
				</ul>
				<ul class="layui-nav layui-layout-right">
					<li class="layui-nav-item">
						<a href="javascript:;" >
							<span id="username">游客</span>
						</a>
						<dl class="layui-nav-child">
							<dd><a href="javascript:showuserinfo();">基本资料</a></dd>
							<dd><a href="javascript:;">安全设置</a></dd>
							<dd><a href="javascript:;">退出登录</a></dd>
						</dl>
					</li>
					<li class="layui-nav-item"><a href="">首页</a></li>
				</ul>
			</div>
			<div class="layui-side layui-bg-black">
				<div class="layui-side-scroll" id="layui_nav_left_1">
					<!-- 左侧导航区域layui9 -->
					<ul class="layui-nav layui-nav-tree"  lay-filter="test">
						<li class="layui-nav-item layui-nav-itemed">
							<a class="" href="javascript:;">借书还书管理</a>
							<dl class="layui-nav-child">
								<dd><a href="javascript:;" data-url="book/booklist.html">书籍信息</a></dd>
								<dd><a href="javascript:;" data-url="borrow/borrow.html">还书</a></dd>
							</dl>
						</li>
						<li class="layui-nav-item ">
							<a href="javascript:;">信息管理</a>
							<dl class="layui-nav-child">
								<dd><a href="javascript:;" data-url="user/userlist.html">用户信息管理</a></dd>
								<dd><a href="javascript:;" data-url="manager/manager.html">管理员信息管理</a></dd>
							</dl>
						</li>
						
					</ul>
				</div>
				<div class="layui-side-scroll" id="layui_nav_left_2">
				
					<!-- 左侧导航区域 切换后（layui） -->
					<ul class="layui-nav layui-nav-tree"  lay-filter="test">
						<li class="layui-nav-item layui-nav-itemed">
							<a class="" href="javascript:; " data-url="sector.html">热度排行</a>
							<dl class="layui-nav-child">
								<dd><a href="javascript:;" data-url="sector.html">扇形图</a></dd>

							</dl>
						</li>
					</ul>
				</div>
			</div>
			<div class="layui-body" id="LAY_app_body">
				<div class="layui-tabsbody-item layui-show">
					<iframe src="book/booklist.html" frameborder="0" class="layui-iframe" style="padding: 15px;"></iframe>
				</div>
			</div>
			<div class="layui-footer" style="text-align: center;">
				<!-- 底部固定区域 -->
				dancun &nbsp;© 后台管理系统
			</div>
		</div>


</body>
	<script src="./assets/js/admin.js"></script>
<script>
	document.getElementById("username").innerText=user.username;
	function showuserinfo(){
		layui.use('layer', function(){
			layer.open({
				title: '用户信息'
				,content:"<div style='margin: 0px auto;text-align: center'>用户名:"+ user.username+"</br>可借阅时间:"+user.timer+"天</br>姓名:"+user.name+"</br>联系电话:"+(user.tel==null?'':user.tel)+"</div>"
			});
		});
	}



</script>
</html>